package com.edu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MyController2 {

    @RequestMapping("/test03")
    public String test03(@RequestParam String stuId){
        return "forward:/index.jsp";
    }


    @RequestMapping("/test04")
    public String test04(){
        String str = null;
        System.out.println(str.length());
        return "forward:/index.jsp";
    }

    @RequestMapping("/test05")
    @ResponseBody
    public String test05(){
        String str = null;
        System.out.println(str.length());
        return "success";
    }

}
